package com.jeff.tianti.cms.service;

import com.jeff.tianti.cms.entity.AssociationDocument;
import com.jeff.tianti.cms.dao.AssociationDocumentDao;
import com.jeff.tianti.cms.dto.AssociationDocumentQueryDTO;
import com.jeff.tianti.common.PageBean;
import com.jeff.tianti.common.service.CommonService;
import com.jeff.tianti.common.entity.PageModel;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author NOW_GO
 * @desc AssociationDocumentService类
 * @date 2019-07-19
 */
@Service
public class AssociationDocumentService extends CommonService<AssociationDocument, String> {

    @Autowired
    private AssociationDocumentDao associationDocumentDao;

    @Autowired
    public void setAssociationDocumentDao(AssociationDocumentDao associationDocumentDao) {
        super.setCommonDao(associationDocumentDao);
    }

    public PageModel<AssociationDocument> queryAssociationDocumentPage(AssociationDocumentQueryDTO associationDocumentQueryDTO) {
        return this.associationDocumentDao.queryAssociationDocumentPage(associationDocumentQueryDTO);
    }

    public List<AssociationDocument> queryAssociationDocumentList(AssociationDocumentQueryDTO associationDocumentQueryDTO) {
        return this.associationDocumentDao.queryAssociationDocumentList(associationDocumentQueryDTO);
    }

    public PageModel<Map<String, Object>> getByKewWord(PageBean pageBean) {
        return this.associationDocumentDao.getByKewWord(pageBean);
    }

    public List<Map<String, Object>> listTitleByKewWordAndId(String kewWord, String id) {
        return this.associationDocumentDao.listTitleByKewWordAndId(kewWord, id);
    }

    public AssociationDocument findMaxSort() {
        return associationDocumentDao.findMaxSort();
    }
}